//统一管理咱们项目用户相关的接口
import request from "@/util/request";
import type {
  userInfoReponseData
} from "./type";

//项目用户相关的请求地址
enum API {
  LOGIN_URL = "/admin/employee/login",
  ReGISTER_URL = "/admin/employee/user/add",
  CHECK_LOGIN_URL = "/admin/employee/user/check",
}

//登录接口
export const reqLogin = (data: any) =>
  request.post<any, userInfoReponseData>(API.LOGIN_URL, data);
//获取用户信息

export const Register = (data: any) => request.post<any, userInfoReponseData>(API.ReGISTER_URL, data);
//退出登录

export const CheckLogin = (id: any) => request.get<any, userInfoReponseData>(`${API.CHECK_LOGIN_URL}/${id}`);